package com.ts.oss.util;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class SmsUtils implements InitializingBean {

    @Value("${zhenziyun.sms.file.apiUrl}")
    private String apiUrl;
    @Value("${zhenziyun.sms.file.appId}")
    private String appId;
    @Value("${zhenziyun.sms.file.appSecret}")
    private String appSecret;
    @Value("${zhenziyun.sms.file.templateId}")
    private String templateId;


    //定义公开静态常量 供其他方法使用
    public static String API_URL;
    public static String APP_ID;
    public static String APP_SECRET;
    public static String TEMPLATED_ID;
    @Override
    public void afterPropertiesSet() throws Exception {
        API_URL=apiUrl;
        APP_ID=appId;
        APP_SECRET=appSecret;
        TEMPLATED_ID=templateId;
    }
}
